#!/bin/bash

VENV_DIR=/opt/sufe/scorpio/.venv
. ${VENV_DIR}/bin/activate
# transport
#     - optional: stdio(forbidden), sse, streamable-http
TRANSPORT=${TRANSPORT:-"sse"}
if [[ $TRANSPORT == "stdio" ]];then
    echo "transport type ${TRANSPORT} is not supported in docker container, exit..."
    exit 1
fi
MCP_SERVER_HOST=${MCP_SERVER_HOST:-"0.0.0.0"}
MCP_SERVER_PORT=${MCP_SERVER_PORT:-8100}
mysql-mcp --transport ${TRANSPORT}  --host ${MCP_SERVER_HOST} --port ${MCP_SERVER_PORT}
